package com.ruoyi.register;

import com.ruoyi.common.security.annotation.EnableCustomConfig;
import com.ruoyi.common.security.annotation.EnableRyFeignClients;
import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import utils.IdWorker;

/**
 * @Author: 程昱轩
 * @Description: TODO
 * @DateTime: @date 2023/2/23 14:09
 **/
@EnableCustomConfig
@EnableCustomSwagger2
@EnableRyFeignClients
@MapperScan("com.ruoyi.register.mapper")
@SpringBootApplication
public class RegisterApplication {
    public static void main(String[] args) {
        SpringApplication.run(RegisterApplication.class,args);
    }
    @Bean
    public BCryptPasswordEncoder bCryptPasswordEncoder() {
        return new BCryptPasswordEncoder();
    }
    @Bean
    public IdWorker idWorker() {
        return new IdWorker();
    }
}
